﻿@using TamoCRM.Domain.Channels
@using TamoCRM.Domain.Collectors
@using TamoCRM.Domain.EducationLevels
@using TamoCRM.Domain.Levels
@using TamoCRM.Domain.Locations
@using TamoCRM.Domain.Majors
@using TamoCRM.Domain.Schools
@using TamoCRM.Domain.SourceTypes
@using TamoCRM.Domain.Status
@using TamoCRM.Domain.StatusCare
@using TamoCRM.Domain.StatusMap
@using TamoCRM.Domain.UserRole
@using TamoCRM.Web.Framework.Users
<!DOCTYPE html>
<html lang="en">


<head>
    <meta charset="utf-8" />
    <title>Topica CRM - User: @UserContext.GetCurrentUser().UserName</title>

    <meta name="description" content="overview &amp; stats" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- basic styles -->

    <link href="/Content/themes/ace/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="/Content/themes/ace/assets/css/font-awesome.min.css" />

    <!-- page specific plugin styles -->
    <link rel="stylesheet" href="/Content/themes/ace/assets/css/jquery-ui-1.10.3.full.min.css" />
    <link rel="stylesheet" href="/Content/themes/ace/assets/css/datepicker.css" />
    <link rel="stylesheet" href="/Content/themes/ace/assets/css/bootstrap-timepicker.css" />
    <link rel="stylesheet" href="/Content/themes/ace/assets/css/ui.jqgrid.css" />

    <!-- fonts -->

    <link rel="stylesheet" href="/Content/themes/ace/assets/css/ace-fonts.css" />

    <!-- ace styles -->

    <link rel="stylesheet" href="/Content/themes/ace/assets/css/ace.min.css" />
    <link rel="stylesheet" href="/Content/themes/ace/assets/css/ace-rtl.min.css" />
    <link rel="stylesheet" href="/Content/themes/ace/assets/css/ace-skins.min.css" />
    <script src="/Content/themes/ace/assets/js/ace-extra.min.js"></script>

    <script type="text/javascript">
        window.jQuery || document.write("<script src='/Content/themes/ace/assets/js/jquery-2.0.3.min.js'>" + "<" + "/script>");
    </script>

    <script type="text/javascript">
        if ("ontouchend" in document) document.write("<script src='/Content/themes/ace/assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
    </script>
    <script src="/Content/themes/ace/assets/js/bootstrap.min.js"></script>
    <script src="/Content/themes/ace/assets/js/typeahead-bs2.min.js"></script>

    <!-- page specific plugin scripts -->

    <script src="/Content/themes/ace/assets/js/date-time/bootstrap-datepicker.min.js"></script>
    <script src="/Content/themes/ace/assets/js/date-time/bootstrap-timepicker.min.js"></script>
    <script src="/Content/themes/ace/assets/js/jqGrid/jquery.jqGrid.min.js"></script>
    <script src="/Content/themes/ace/assets/js/jqGrid/i18n/grid.locale-en.js"></script>

    <!-- page specific plugin scripts -->
    <script src="/Content/themes/ace/assets/js/jquery-ui-1.10.3.custom.min.js"></script>
    <script src="/Content/themes/ace/assets/js/jquery.ui.touch-punch.min.js"></script>
    <script src="/Content/themes/ace/assets/js/jquery.slimscroll.min.js"></script>
    <script src="/Content/themes/ace/assets/js/jquery.easy-pie-chart.min.js"></script>
    <script src="/Content/themes/ace/assets/js/jquery.sparkline.min.js"></script>
    <script src="/Content/themes/ace/assets/js/flot/jquery.flot.min.js"></script>
    <script src="/Content/themes/ace/assets/js/flot/jquery.flot.pie.min.js"></script>
    <script src="/Content/themes/ace/assets/js/flot/jquery.flot.resize.min.js"></script>
    <script src="/Scripts/fuelux.tree.min.js"></script>

    <script type="text/javascript" src="/Content/themes/ace/assets/js/jquery.form.js"></script>
    <script type="text/javascript" src="/Content/themes/ace/assets/js/jquery.tmpl.js"></script>

    <!-- ace scripts -->

    <script type="text/javascript" src="/Content/themes/ace/assets/js/ace-elements.min.js"></script>
    <script type="text/javascript" src="/Content/themes/ace/assets/js/ace.min.js"></script>

    <!-- tamo crm-->
    <script src="/Scripts/admin.js"></script>
    <script src="/Scripts/admin.utility.js"></script>
    <!-- tamo css -->
    <link rel="stylesheet" href="/Content/themes/ace/assets/css/tamo.css" />

    <!-- Piwik -->
    <script type="text/javascript">
        var _paq = _paq || [];
        _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function() {
            var u=(("https:" == document.location.protocol) ? "https" : "http") + "://noc.tis.topica.vn/topica/";
            _paq.push(['setTrackerUrl', u+'piwik.php']);
            _paq.push(['setSiteId', 35]);
            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
            g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
        })();
    </script>




    <noscript>
        <p>
            <img src="http://noc.tis.topica.vn/topica/piwik.php?idsite=35" style="border: 0;" alt="" />
        </p>
    </noscript>
    <!-- End Piwik Code -->
</head>

<body>
    <div class="navbar navbar-default" id="navbar">
        <script type="text/javascript">
            try {
                ace.settings.check('navbar', 'fixed'); } catch (e) { }
        </script>

        <div class="navbar-container" id="navbar-container">
            <div class="navbar-header pull-left">
                <a href="#" class="navbar-brand">
                    <small>TOPICA CRM
                    </small>
                </a>
                <!-- /.brand -->
            </div>
            <!-- /.navbar-header -->
            <div class="navbar-header pull-left">
                <div style="margin-top: 7px;">
                </div>
                <!-- /.brand -->
            </div>
            <!-- /.navbar-header -->

            <div class="navbar-header pull-right" role="navigation">
                <ul class="nav ace-nav">
                    <li class="light-blue" style="width: 115px; padding: 5px 10px 0 0;">
                        @Html.Action("BranchSelectBox", "Branch")
                    </li>
                     @Html.Action("NotifyMissedCall", "MissedCall")
                    <li class="light-blue">
                        <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                            <span class="user-info">
                                <small>Welcome,</small>
                                @UserContext.GetCurrentUser().UserName
                            </span>

                            <i class="icon-caret-down"></i>
                        </a>
                        <ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                            <li>
                                <a href="/Admin/User/ChangePassword">
                                    <i class="icon-cog"></i>
                                    Thay đối mật khẩu
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="/Account/Logoff">
                                    <i class="icon-off"></i>
                                    Đăng xuất
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
            <!-- /.navbar-header -->
        </div>
        <!-- /.container -->
    </div>

    <div class="main-container" id="main-container">

        <script type="text/javascript">
            try {
                ace.settings.check('main-container', 'fixed');
            }
            catch (e) {
                
            }
        </script>

        <div class="main-container-inner">
            <a class="menu-toggler" id="menu-toggler" href="#">
                <span class="menu-text"></span>
            </a>
            <div class="sidebar" id="sidebar">

                @Html.Partial("Menu")
            </div>

            <div class="main-content">
                @RenderBody()
                <div style="width: 100%; text-align: center; padding: 10px;">Copyright 2014 Topica. All Rights Reverved.</div>
            </div>
            <!-- /.main-content -->

            <!-- /#ace-settings-container -->
        </div>
        <!-- /.main-container-inner -->

        <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
            <i class="icon-double-angle-up icon-only bigger-110"></i>
        </a>
    </div>
    <!-- /.main-container -->

</body>

</html>
<script type="text/javascript">
    globalLevels = @Html.Raw(Json.Encode(((IEnumerable<LevelInfo>)ViewBag.Levels).Select(c => new { LevelId = c.LevelId, Name = c.Name })));
    globalMajors = @Html.Raw(Json.Encode(((IEnumerable<MajorInfo>)ViewBag.Majors).Select(c => new { MajorId = c.MajorId, Name = c.Name })));
    globalStatusMaps = @Html.Raw(Json.Encode(((IEnumerable<StatusMapInfo>)ViewBag.StatusMaps).Select(c => new { Id = c.Id, Name = c.Name })));
    globalUsers = @Html.Raw(Json.Encode(((IEnumerable<UserInfo>)ViewBag.Users).Select(c => new { UserID = c.UserID, FullName = c.FullName })));
    globalStatus = @Html.Raw(Json.Encode(((IEnumerable<StatusInfo>)ViewBag.Status).Select(c => new { StatusId = c.StatusId, Name = c.Name })));
    globalStatusCares = @Html.Raw(Json.Encode(((IEnumerable<StatusCareInfo>)ViewBag.StatusCares).Select(c => new { Id = c.Id, Name = c.Name })));
    globalSchools = @Html.Raw(Json.Encode(((IEnumerable<SchoolInfo>)ViewBag.Schools).Select(c => new { SchoolId = c.SchoolId, Name = c.Name })));
    globalChannels = @Html.Raw(Json.Encode(((IEnumerable<ChannelInfo>)ViewBag.Channels).Select(c => new { ChannelId = c.ChannelId, Name = c.Name })));
    globalLocations = @Html.Raw(Json.Encode(((IEnumerable<LocationInfo>)ViewBag.Locations).Select(c => new { LocationId = c.LocationId, Name = c.Name })));
    globalCollectors = @Html.Raw(Json.Encode(((IEnumerable<CollectorInfo>)ViewBag.Collectors).Select(c => new { CollectorId = c.CollectorId, Name = c.Name })));
    globalSourceTypes = @Html.Raw(Json.Encode(((IEnumerable<SourceTypeInfo>)ViewBag.SourceTypes).Select(c => new { SourceTypeId = c.SourceTypeId, Name = c.Name })));
    globalEducationLevels = @Html.Raw(Json.Encode(((IEnumerable<EducationLevelInfo>)ViewBag.EducationLevels).Select(c => new { EducationLevelId = c.EducationLevelId, Name = c.Name })));
</script>
